// 主界面
;define(function(require, exports, module) {
    'use strict';
    var util = require("util");
    var base = require("base");
    var router = require("../hash/pageRouter");
    var css_this = require("./cargoDetail.css");
    var dialog = require("dialog");
    var validate = require("validate");
    var pageIndex = 1,
        pageSize = 10,
        totalPageCount = 1,
        totalRecordCount = 0; //分页初始化
    var imgSrc;
    var init = function(num){
		initEvent();
		router.init();
		$("#leftMenu2").find(".leftMenu-item").removeClass("leftMenu-active");
		$("#leftMenu2 #cargoTaskList").parent(".leftMenu-item").addClass("leftMenu-active");
    };
	var initEvent = function(){
		
		$(".page-header").on("click","a",function(){
			var path = $(this).attr("id");
			top.location.href="../"+path+"/"+path+".html";
		});
		
		$(".page-content").on("click","#releaseCargoRecord",function(){
			var path = $(this).attr("id");
			router.route("cargoTaskList/"+path+".html");
		});
		
		$(".page-content-main").on("click","#deliveryRecord",function(){
			var path = $(this).attr("id");
			router.route("cargoTaskList/"+path+".html");
		});
    };
    return {
        init:init
    };
});